package com.fanshuai.websocket.server;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.HandlerMapping;
import org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter;

@Configuration
public class WebFluxConfig {

    @Bean
    public HandlerMapping webSocketMapping() {
        return new WebSocketHandlerMapping();
    }

    @Bean(name = "webSocketHandlerAdapter")
    public WebSocketHandlerAdapter webSocketHandlerAdapter() {
        return new WebSocketHandlerAdapter();
    }
}
